package goods.api;

import goods.model.Goods;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import utils.sql.PageVo;

import java.math.BigDecimal;
import java.util.Map;

/**
 * Created by Roney on 2016/9/29.
 */
public interface GoodsApi {
    /**
     * 按ID获取商品信息
     * @param id
     * @return
     */
    Goods findById(String id);

    PageVo findByGoods(String[] levelNum, String goods_name, String goods_state, int page,int number);

    Map updateGoods(String id);

    Map updateGoods(Goods goods);

    String toString();

    int updatePriceBySku(String sku, BigDecimal price, BigDecimal jdPrice);

    public Page<Goods> findByParams(String storeId, Pageable pageable);
    public Page<Goods> findByParams(String storeId, Integer state, Pageable pageable);
    public Page<Goods> findByParams(String storeId, String name, Pageable pageable);
    public Page<Goods> findByParams(String storeId, String name, Integer state, Pageable pageable);
}
